home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / csp9606a.zip / CSPLIT.H < prev    next >
C/C++ Source or Header  |  1996-06-02  |  2KB  |  62 lines

  1. /*
  2.  * CSplit.h
  3.  * 08/31/93  Fred Cole     original
  4.  */
  5.  
  6. #ifndef  __STDC__
  7. #include "portable.h"
  8. #endif
  9.  
  10. #define VERSION   "2.2"
  11.  
  12. #ifndef B_FALSE
  13. #define B_FALSE 0
  14. #endif
  15.  
  16. #ifndef B_TRUE
  17. #define B_TRUE  1
  18. #endif
  19.  
  20. enum { NOERR = 0, SYNTAX, ABORT, MEMORY, FILEIO, PROCESS };
  21.  
  22. #define FNAMELEN  12    /* 8.3 filename character count     */
  23. #define LLENMAX  128    /* maximum input source line length */
  24. #define PATHMAX   80    /* maximum path length              */
  25. #define MAXFSPEC (PATHMAX + FNAMELEN)
  26.  
  27. #define LENMIN    25    /* minimum source lines per section */
  28. #define LENDEF    90    /* default source lines per section */ /* TS */
  29. #define LENMAX SHRT_MAX /* maximum source lines per section */
  30. #define TABMIN     2    /* minimum spaces per tab char      */
  31. #define TABDEF     4    /* default spaces per tab char      */
  32. #define TABMAX    16    /* maximum spaces per tab char      */
  33. #define WIDMIN    55    /* minimum source chars per line    */
  34. #define WIDDEF    75    /* default source chars per line    */
  35. #define WIDMAX   255    /* maximum source chars per line    */
  36.  
  37. #define SEP_CLEN 10     /* separator character string length */
  38. #define SEP_CDEF '>'    /* default separator character */
  39. #define SEP_BF   "Begin file "
  40. #define SEP_BP   "Begin part "
  41. #define SEP_EF   "End file "
  42. #define SEP_EP   "End part "
  43. #define SEP_ID   "CSplit: "
  44. #define SEP_VR   "Version "
  45.  
  46. typedef struct _slst
  47. {
  48.   char srcfile[MAXFSPEC + 1];     /* path and filename */
  49.   struct _slst *next;
  50. } SLST;
  51.  
  52. SLST *add_list  (char *);
  53. void  cleanup   (void);
  54. char *csp_fgets (char *, int, FILE *, int);
  55. void  disp_help (void);
  56. int   extr_file (char *, char);
  57. void  free_list (void);
  58. int   init_list (int, char **, int);
  59. int   split_src (SLST *, char *, int, int, int, char);
  60. unsigned short updcrc (unsigned short, unsigned char *, unsigned int);
  61. void  initcrctab (void);
  62.